<div ng-form="innerForm"
     ng-mousedown="enterEditMode($event)"
     ng-click="$event.stopPropagation()"
     ng-class="{ dirty: params.dirty }">

  &nbsp;<span ng-show="!editMode" >{{ getLabel() | translate }}</span>

  <i class="edit fa fa-pencil-square" ng-show="!editMode && collection.length != 0" ng-focus="enterEditMode()"
     tabindex="{{ collection.length != 0 ? params.tabindex : -1 }}"></i>

  <div class="editable-select" ng-if="editMode" ng-keyup="keyUp($event)" ng-mousedown="$event.stopPropagation()"
       ng-click="$event.stopPropagation()">

    <select chosen
            ng-model="params.value"
            name="{{ params.name }}"
            ng-change="submit()"
            ng-required="params.required"
            tabindex="{{ params.tabindex }}"
            data-width="'250px'"
            ng-options="option.value as option.label for option in collection">
      <option value="" ng-selected="params.value === ''" ng-if="!params.required">
        -- {{ 'SELECT_NO_OPTION_SELECTED' | translate | limitTo : 70 }} --
      </option>
    </select>
  </div>
</div>
